package com.example.demo;

import lombok.Data;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * <p>Description:  </p>
 * <p>CreateTime:   2020/7/7 </p>
 *
 * @author fujian
 */
@Component
public class EqualsMethods {

    @Data
    class Person{
        String name;
        Integer id;
        Double salary;
        @Override
        public boolean equals(Object other){
            if (null == other) {
                return false;
            } else if (!(other instanceof Person)) {
//                instanceof 运算符只能用作对象的判断。
                return false;
            }
            return false;
        }
        /**
         * @see Cloneable
         */
        @Override
        protected Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @PostConstruct
    public void test(){

    }


}
